using System;

namespace Newtonsoft.Json
{
	public class Identifier
	{
		private string _name;

		public string Name
		{
			get
			{
				return this._name;
			}
		}

		public Identifier(string name)
		{
			this._name = name;
		}

		public override bool Equals(object obj)
		{
			return this.Equals(obj as Identifier);
		}

		public bool Equals(Identifier function)
		{
			return this._name == function.Name;
		}

		public static bool Equals(Identifier a, Identifier b)
		{
			if (a == b)
			{
				return true;
			}
			if (!(a != null) || !(b != null))
			{
				return false;
			}
			return a.Equals(b);
		}

		public override int GetHashCode()
		{
			return this._name.GetHashCode();
		}

		private static bool IsAsciiLetter(char c)
		{
			if (c >= 'A' && c <= 'Z')
			{
				return true;
			}
			if (c < 'a')
			{
				return false;
			}
			return c <= 'z';
		}

		public static bool operator ==(Identifier a, Identifier b)
		{
			return Identifier.Equals(a, b);
		}

		public static bool operator !=(Identifier a, Identifier b)
		{
			return !Identifier.Equals(a, b);
		}

		public override string ToString()
		{
			return this._name;
		}
	}
}